﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Template_Admin.Master" AutoEventWireup="true" CodeBehind="QuanLy_DiaChi_CuaHang.aspx.cs" Inherits="Cua_Hang.Admin.QuanLy_DiaChi_CuaHang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style1">
        <tr>
            <td colspan="2">
                <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Italic="True" 
                    Font-Size="Larger" ForeColor="#00CC00" Text="Quản Lý Địa Chỉ Cửa Hàng"></asp:Label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style2">
                <asp:Label ID="Label2" runat="server" Text="Tên Cửa Hàng"></asp:Label>&nbsp;
                :&nbsp;<asp:DropDownList ID="DDL_TenCuaHang" runat="server" Height="17px" 
                    Width="216px">
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style2">
                <asp:Label ID="Label3" runat="server" Text="Tên Đường"></asp:Label>&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:TextBox ID="TB_TenDuong" runat="server" Width="217px"></asp:TextBox>
            </td>
            <td align="left">
                <asp:Label ID="Label4" runat="server" Text="Điện Thoại"></asp:Label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                :&nbsp;&nbsp;&nbsp;<asp:TextBox ID="TB_DienThoai" runat="server" Width="216px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style2">
                <asp:Label ID="Label5" runat="server" Text="Email"></asp:Label>&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox 
                    ID="TB_Email" runat="server" Width="221px"></asp:TextBox>
            </td>
            <td align="left">
                <asp:Label ID="Label6" runat="server" Text="Tên Cửa Hàng Hiện Trên Bản Đồ"></asp:Label>
                </td>
        </tr>
        <tr>
            <td align="left" class="style2">
                <asp:TextBox ID="TB_DiaChi_CuaHang" runat="server" Width="82px" 
                    Visible="False" ></asp:TextBox>
            </td>
            <td align="left">
                <asp:TextBox ID="TB_TenCuaHang" runat="server" Width="328px" 
                    ontextchanged="TB_TenCuaHang_TextChanged"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style2">
                <asp:Label ID="Label7" runat="server" Text="Phường"></asp:Label>&nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox 
                    ID="TB_Phuong" runat="server" Width="224px"></asp:TextBox>
            </td>
            <td align="left">
                <asp:Label ID="Label8" runat="server" Text="Quận"></asp:Label>
              &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;:&nbsp;
                <asp:TextBox ID="TB_Quan" runat="server" Width="222px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style2">
                <asp:Label ID="Label9" runat="server" Text="Thành Phố"></asp:Label>
           &nbsp;:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox ID="TB_ThanhPho" runat="server" Width="224px"></asp:TextBox>
            </td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="left" class="style2">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="center" class="style2">
                <asp:Button ID="BT_Them" runat="server" Text="Thêm" onclick="BT_Them_Click" />
            </td>
            <td align="center">
                <asp:Button ID="BT_CapNhat" runat="server" Text="Cập Nhật" 
                    onclick="BT_CapNhat_Click" />
            </td>
        </tr>
        <tr>
            <td align="left" class="style2">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
        <tr>
            <td align="center" class="style2" colspan="2">
                <asp:GridView ID="GV_DiaChiCuaHang" runat="server"
                 DataKeyNames="ID_ThongTin_CuaHang"
                AutoGenerateColumns="False" onrowcommand="GV_DiaChiCuaHang_RowCommand" 
                    onselectedindexchanged="GV_DiaChiCuaHang_SelectedIndexChanged" 
                    onpageindexchanged="GV_DiaChiCuaHang_PageIndexChanged" 
                    onpageindexchanging="GV_DiaChiCuaHang_PageIndexChanging" 
                    AllowPaging="True" BackColor="White" BorderColor="#CC9966" BorderStyle="None" 
                    BorderWidth="1px" CellPadding="4" PageSize="4">
                <Columns>

                       <asp:BoundField DataField="ID_ThongTin_CuaHang" HeaderText="Mã" SortExpression="ID_ThongTin_CuaHang" />
                        <asp:BoundField DataField="Ten_cuahang" HeaderText="Tên cửa Hàng Trên Bản Đồ" SortExpression="Ten_cuahang" />
                        <asp:BoundField DataField="Duong_CuaHang" HeaderText="Đường" SortExpression="Duong_CuaHang" />
                        <asp:BoundField DataField="Phuong_CuaHang" HeaderText="Phường" SortExpression="Phuong_CuaHang" />
                        <asp:BoundField DataField="Quan_CuaHang" HeaderText="Quận" SortExpression="Quan_CuaHang" />
                        <asp:BoundField DataField="Tp_CuaHang" HeaderText="Thành Phố" SortExpression="Tp_CuaHang" />
                        <asp:BoundField DataField="Email_CuaHang" HeaderText="Email" SortExpression="Email_CuaHang" />
                        <asp:BoundField DataField="DienThoai_Cuahang" HeaderText="Điện Thoại" SortExpression="DienThoai_Cuahang" />
                        <asp:CommandField SelectText="Sửa" HeaderText="Sửa " ShowSelectButton="True" />
                        <asp:TemplateField HeaderText="Xoá">
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" OnClientClick="return confirm('Ban co muon xoa ko?')" runat="server" CommandName="Xoa" CommandArgument='<%# Eval("ID_ThongTin_CuaHang")%>'>Xoá</asp:LinkButton>
                        </ItemTemplate>
                        </asp:TemplateField>




                </Columns>


                    <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
                    <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
                    <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
                    <RowStyle BackColor="White" ForeColor="#330099" />
                    <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
                    <SortedAscendingCellStyle BackColor="#FEFCEB" />
                    <SortedAscendingHeaderStyle BackColor="#AF0101" />
                    <SortedDescendingCellStyle BackColor="#F6F0C0" />
                    <SortedDescendingHeaderStyle BackColor="#7E0000" />


                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="left" class="style2">
                &nbsp;</td>
            <td align="left">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
